package com.ruoyi.modes.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.modes.entity.TJrRentInstallment;
import com.ruoyi.modes.mapper.TJrRentInstallmentMapper;
import com.ruoyi.modes.service.ITJrRentInstallmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 房租分期申请Service业务层处理
 * 
 * @author wish
 * @date 2021-06-29
 */
@Service
public class TJrRentInstallmentServiceImpl implements ITJrRentInstallmentService
{
    @Autowired
    private TJrRentInstallmentMapper tJrRentInstallmentMapper;

    /**
     * 查询房租分期申请
     * 
     * @param id 房租分期申请ID
     * @return 房租分期申请
     */
    @Override
    public TJrRentInstallment selectTJrRentInstallmentById(Long id)
    {
        return tJrRentInstallmentMapper.selectTJrRentInstallmentById(id);
    }

    /**
     * 查询房租分期申请列表
     * 
     * @param tJrRentInstallment 房租分期申请
     * @return 房租分期申请
     */
    @Override
    public List<TJrRentInstallment> selectTJrRentInstallmentList(TJrRentInstallment tJrRentInstallment)
    {
        return tJrRentInstallmentMapper.selectTJrRentInstallmentList(tJrRentInstallment);
    }

    /**
     * 新增房租分期申请
     * 
     * @param tJrRentInstallment 房租分期申请
     * @return 结果
     */
    @Override
    public int insertTJrRentInstallment(TJrRentInstallment tJrRentInstallment)
    {
        tJrRentInstallment.setCreateTime(DateUtils.getNowDate());
        return tJrRentInstallmentMapper.insertTJrRentInstallment(tJrRentInstallment);
    }

    /**
     * 修改房租分期申请
     * 
     * @param tJrRentInstallment 房租分期申请
     * @return 结果
     */
    @Override
    public int updateTJrRentInstallment(TJrRentInstallment tJrRentInstallment)
    {
        tJrRentInstallment.setUpdateTime(DateUtils.getNowDate());
        return tJrRentInstallmentMapper.updateTJrRentInstallment(tJrRentInstallment);
    }

    /**
     * 批量删除房租分期申请
     * 
     * @param ids 需要删除的房租分期申请ID
     * @return 结果
     */
    @Override
    public int deleteTJrRentInstallmentByIds(Long[] ids)
    {
        return tJrRentInstallmentMapper.deleteTJrRentInstallmentByIds(ids);
    }

    /**
     * 删除房租分期申请信息
     * 
     * @param id 房租分期申请ID
     * @return 结果
     */
    @Override
    public int deleteTJrRentInstallmentById(Long id)
    {
        return tJrRentInstallmentMapper.deleteTJrRentInstallmentById(id);
    }
}
